﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL_Class;

namespace NLLSite.Administrator.UserControl
{
    public partial class AddNewEbook : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnAdd_Click(object sender, EventArgs e)
        {
            SachDT s = new SachDT();
            Ebook eb = new Ebook();

            eb.Title = txtName.Text;
            eb.ImageUrl = txtImage.Text;
            eb.Description = CKEditor1.Text;
            eb.FileUrl = txtFile.Text;

            Label1.Text = s.AddNewEbook(eb);
            Response.Redirect("QuanlyEbook.aspx");
        }
    }
}